MODULE	'exec/nodes'
MODULE	'exec/interrupts'

#define CARDRESNAME 	'card.resource'

OBJECT CardHandle
	CardNode:Node,
	CardRemoved:PTR TO Interrupt,
	CardInserted:PTR TO Interrupt,
	CardStatus:PTR TO Interrupt,
	CardFlags:UBYTE

OBJECT DeviceTData
	DTsize:ULONG,
	DTspeed:ULONG,
	DTtype:UBYTE,
	DTflags:UBYTE

OBJECT CardMemoryMap
	CommonMemory:PTR TO UBYTE,
	AttributeMemory:PTR TO UBYTE,
	IOMemory:PTR TO UBYTE,
	CommonMemSize:ULONG,
	AttributeMemSize:ULONG,
	IOMemSize:ULONG

#define CARDB_RESETREMOVE 	0
#define CARDF_RESETREMOVE 	(1<<CARDB_RESETREMOVE)
#define CARDB_IFAVAILABLE 	1
#define CARDF_IFAVAILABLE 	(1<<CARDB_IFAVAILABE)
#define CARDB_DELAYOWNERSHIP 	2
#define CARDF_DELAYOWNERSHIP 	(1<<CARDB_DEAYOWNERSHIP)
#define CARDB_POSTSTATUS 	3
#define CARDF_POSTSTATUS 	(1<<CARDB_POSTSTATUS)
#define CARDB_REMOVEHANDLE 	0
#define CARDF_REMOVEHANDLE 	(1<<CARDB_REMOVEHANDE)
#define CARD_STATUSB_CCDET 		6
#define CARD_STATUSF_CCDET 		(1<<CARD_STATUSB_CCDET)
#define CARD_STATUSB_BVD1 		5
#define CARD_STATUSF_BVD1 		(1<<CARD_STATUSB_BVD1)
#define CARD_STATUSB_SC 			5
#define CARD_STATUSF_SC 			(1<<CARD_STATUSB_SC)
#define CARD_STATUSB_BVD2 		4
#define CARD_STATUSF_BVD2 		(1<<CARD_STATUSB_BVD2)
#define CARD_STATUSB_DA 			4
#define CARD_STATUSF_DA 			(1<<CARD_STATUSB_DA)
#define CARD_STATUSB_WR 			3
#define CARD_STATUSF_WR 			(1<<CARD_STATUSB_WR)
#define CARD_STATUSB_BSY 		2
#define CARD_STATUSF_BSY 		(1<<CARD_STATUSB_BSY)
#define CARD_STATUSB_IRQ 		2
#define CARD_STATUSF_IRQ 		(1<<CARD_STATUSB_IRQ)
#define CARD_VOLTAGE_0V 		0
#define CARD_VOLTAGE_5V 		1
#define CARD_VOLTAGE_12V 	2
#define CARD_ENABLEB_DIGAUDIO 	1
#define CARD_ENABLEF_DIGAUDIO 	(1<<CARD_ENABEB_DIGAUDIO)
#define CARD_DISABLEB_WP 	3
#define CARD_DISABLEF_WP 	(1<<CARD_DISABEB_WP)
#define CARD_INTB_SETCLR 	7
#define CARD_INTF_SETCLR 	(1<<CARD_INTB_SETCR)
#define CARD_INTB_BVD1 		5
#define CARD_INTF_BVD1 		(1<<CARD_INTB_BVD1)
#define CARD_INTB_SC 		5
#define CARD_INTF_SC 		(1<<CARD_INTB_SC)
#define CARD_INTB_BVD2 		4
#define CARD_INTF_BVD2 		(1<<CARD_INTB_BVD2)
#define CARD_INTB_DA 		4
#define CARD_INTF_DA 		(1<<CARD_INTB_DA)
#define CARD_INTB_BSY 		2
#define CARD_INTF_BSY 		(1<<CARD_INTB_BSY)
#define CARD_INTB_IRQ 		2
#define CARD_INTF_IRQ 		(1<<CARD_INTB_IRQ)
#define CARD_INTERFACE_AMIGA_0 	0
#define CISTPL_AMIGAXIP 	$91

OBJECT TP_AmigaXIP
	CODE:UBYTE,
	LINK:UBYTE,
	XIPLOC[4]:UBYTE,
	XIPFLAGS:UBYTE,
	XIPRESRV:UBYTE

#define XIPFLAGSB_AUTORUN 	0
#define XIPFLAGSF_AUTORUN 	(1<<XIPFAGSB_AUTORUN)
